package net.xdclass.service;

import net.xdclass.controller.request.ShortLinkAddRequest;
import net.xdclass.controller.request.ShortLinkDelRequest;
import net.xdclass.controller.request.ShortLinkPageRequest;
import net.xdclass.controller.request.ShortLinkUpdateRequest;
import net.xdclass.model.EventMessage;
import net.xdclass.utils.JsonData;
import net.xdclass.vo.ShortLinkVO;

import java.util.Map;

public interface ShortLinkService {
    ShortLinkVO parseShortLinkCode(String shortLinkCode);

    JsonData createShortLink(ShortLinkAddRequest request);




    Map<String, Object> pageByGroupId(ShortLinkPageRequest request);

    JsonData del(ShortLinkDelRequest request);

    JsonData update(ShortLinkUpdateRequest request);

    /**
     * 处理新增短链消息
     *
     * @param eventMessage
     * @return
     */
    boolean handleAddShortLink(EventMessage eventMessage);

    boolean handleDelShortLink(EventMessage eventMessage);

    boolean handleUpdateShortLink(EventMessage eventMessage);
}
